<%--                                                                       --%>
<%-- Copyright (c) 2005 BroadVision, Inc.  All rights reserved.            --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<script language="javascript">

function doUnload() {

  // **** AUTO FLOW CANCEL **********
  try {
    // if document is unloaded because it is NOT caused by hitting any
    // form button AND this document has cancel button, 
    // we assume this is caused by hitting X to close this window. 

    // the following variables are pre-defined
    if ((_form_button_clicked == false) && (_has_cancel_event == true)) {
      // alert('do cancel automatically !!');
      // perform cancel automatically to clean up current flow.
      doCancel();
    }
  }
  catch (e) {
   // catch undefined variables
  }
  // **** AUTO FLOW CANCEL **********

    if (self.opener != "" && self.opener.name != undefined) {
      self.opener.refreshOpener();
    }
 }
</script>

<body onunload="doUnload()">

<bean:parameter id="processBody" name="_process_content"/>

<tiles:insert beanName="processBody"/>
